{
 "cells": [
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "# Example code to apply the modular splicing model"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "Example test variants come from ClinVar BRCA1 variants"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "## Splicing delta PSI prediction"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 1,
   "metadata": {},
   "outputs": [
    {
     "name": "stderr",
     "output_type": "stream",
     "text": [
      "Using TensorFlow backend.\n",
      "/home/muhammedhasan/Projects/MMSplice/old-env/lib/python3.7/site-packages/concise/utils/plot.py:115: FutureWarning: arrays to stack must be passed as a \"sequence\" type such as list or tuple. Support for non-sequence iterables such as generators is deprecated as of NumPy 1.16 and will raise an error in the future.\n",
      "  min_coords = np.vstack(data.min(0) for data in polygons_data).min(0)\n",
      "/home/muhammedhasan/Projects/MMSplice/old-env/lib/python3.7/site-packages/concise/utils/plot.py:116: FutureWarning: arrays to stack must be passed as a \"sequence\" type such as list or tuple. Support for non-sequence iterables such as generators is deprecated as of NumPy 1.16 and will raise an error in the future.\n",
      "  max_coords = np.vstack(data.max(0) for data in polygons_data).max(0)\n",
      "WARNING: Logging before flag parsing goes to stderr.\n",
      "W0812 20:34:13.562207 140080037934848 deprecation_wrapper.py:119] From /home/muhammedhasan/Projects/MMSplice/old-env/lib/python3.7/site-packages/keras/optimizers.py:790: The name tf.train.Optimizer is deprecated. Please use tf.compat.v1.train.Optimizer instead.\n",
      "\n",
      "/home/muhammedhasan/Projects/MMSplice/old-env/lib/python3.7/site-packages/sklearn/externals/joblib/__init__.py:15: DeprecationWarning: sklearn.externals.joblib is deprecated in 0.21 and will be removed in 0.23. Please import this functionality directly from joblib, which can be installed with: pip install joblib. If this warning is raised when loading pickled models, you may need to re-serialize those models with scikit-learn 0.21+.\n",
      "  warnings.warn(msg, category=DeprecationWarning)\n",
      "/home/muhammedhasan/Projects/MMSplice/old-env/lib/python3.7/site-packages/sklearn/base.py:306: UserWarning: Trying to unpickle estimator HuberRegressor from version 0.19.2 when using version 0.21.2. This might lead to breaking code or invalid results. Use at your own risk.\n",
      "  UserWarning)\n",
      "/home/muhammedhasan/Projects/MMSplice/old-env/lib/python3.7/site-packages/sklearn/base.py:306: UserWarning: Trying to unpickle estimator StandardScaler from version 0.19.2 when using version 0.21.2. This might lead to breaking code or invalid results. Use at your own risk.\n",
      "  UserWarning)\n",
      "/home/muhammedhasan/Projects/MMSplice/old-env/lib/python3.7/site-packages/sklearn/base.py:306: UserWarning: Trying to unpickle estimator LogisticRegression from version 0.19.2 when using version 0.21.2. This might lead to breaking code or invalid results. Use at your own risk.\n",
      "  UserWarning)\n",
      "/home/muhammedhasan/Projects/MMSplice/old-env/lib/python3.7/site-packages/sklearn/base.py:306: UserWarning: Trying to unpickle estimator Pipeline from version 0.19.2 when using version 0.21.2. This might lead to breaking code or invalid results. Use at your own risk.\n",
      "  UserWarning)\n"
     ]
    }
   ],
   "source": [
    "from mmsplice.vcf_dataloader import SplicingVCFDataloader\n",
    "from mmsplice import MMSplice, predict_all_table\n",
    "\n",
    "from mmsplice.utils import max_varEff"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 2,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "'0.2.7'"
      ]
     },
     "execution_count": 2,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "import pkg_resources\n",
    "assert pkg_resources.get_distribution(\"mmsplice\").version == '0.2.7'\n",
    "pkg_resources.get_distribution(\"mmsplice\").version"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 3,
   "metadata": {},
   "outputs": [],
   "source": [
    "gtf = '../tests/data/test.gtf'\n",
    "vcf = '../tests/data/test.vcf.gz'\n",
    "fasta = '../tests/data/hg19.nochr.chr17.fa'"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 4,
   "metadata": {},
   "outputs": [],
   "source": [
    "dl = SplicingVCFDataloader(gtf, fasta, vcf,\n",
    "                          split_seq=False,encode=False, overhang=(100,100))"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 5,
   "metadata": {},
   "outputs": [
    {
     "name": "stderr",
     "output_type": "stream",
     "text": [
      "W0812 20:34:17.349804 140080037934848 deprecation_wrapper.py:119] From /home/muhammedhasan/Projects/MMSplice/old-env/lib/python3.7/site-packages/keras/backend/tensorflow_backend.py:95: The name tf.reset_default_graph is deprecated. Please use tf.compat.v1.reset_default_graph instead.\n",
      "\n",
      "W0812 20:34:17.353101 140080037934848 deprecation_wrapper.py:119] From /home/muhammedhasan/Projects/MMSplice/old-env/lib/python3.7/site-packages/keras/backend/tensorflow_backend.py:98: The name tf.placeholder_with_default is deprecated. Please use tf.compat.v1.placeholder_with_default instead.\n",
      "\n",
      "W0812 20:34:17.363179 140080037934848 deprecation_wrapper.py:119] From /home/muhammedhasan/Projects/MMSplice/old-env/lib/python3.7/site-packages/keras/backend/tensorflow_backend.py:102: The name tf.get_default_graph is deprecated. Please use tf.compat.v1.get_default_graph instead.\n",
      "\n",
      "W0812 20:34:17.369028 140080037934848 deprecation_wrapper.py:119] From /home/muhammedhasan/Projects/MMSplice/old-env/lib/python3.7/site-packages/keras/backend/tensorflow_backend.py:517: The name tf.placeholder is deprecated. Please use tf.compat.v1.placeholder instead.\n",
      "\n",
      "W0812 20:34:17.373578 140080037934848 deprecation_wrapper.py:119] From /home/muhammedhasan/Projects/MMSplice/old-env/lib/python3.7/site-packages/keras/backend/tensorflow_backend.py:4138: The name tf.random_uniform is deprecated. Please use tf.random.uniform instead.\n",
      "\n",
      "/home/muhammedhasan/Projects/MMSplice/old-env/lib/python3.7/site-packages/keras/engine/saving.py:292: UserWarning: No training configuration found in save file: the model was *not* compiled. Compile it manually.\n",
      "  warnings.warn('No training configuration found in save file: '\n",
      "W0812 20:34:17.809584 140080037934848 deprecation.py:506] From /home/muhammedhasan/Projects/MMSplice/old-env/lib/python3.7/site-packages/keras/backend/tensorflow_backend.py:3445: calling dropout (from tensorflow.python.ops.nn_ops) with keep_prob is deprecated and will be removed in a future version.\n",
      "Instructions for updating:\n",
      "Please use `rate` instead of `keep_prob`. Rate should be set to `rate = 1 - keep_prob`.\n",
      "W0812 20:34:17.983376 140080037934848 deprecation.py:323] From /home/muhammedhasan/Projects/MMSplice/old-env/lib/python3.7/site-packages/tensorflow/python/ops/nn_impl.py:180: add_dispatch_support.<locals>.wrapper (from tensorflow.python.ops.array_ops) is deprecated and will be removed in a future version.\n",
      "Instructions for updating:\n",
      "Use tf.where in 2.0, which has the same broadcast rule as np.where\n",
      "/home/muhammedhasan/Projects/MMSplice/old-env/lib/python3.7/site-packages/keras/engine/saving.py:292: UserWarning: No training configuration found in save file: the model was *not* compiled. Compile it manually.\n",
      "  warnings.warn('No training configuration found in save file: '\n",
      "/home/muhammedhasan/Projects/MMSplice/old-env/lib/python3.7/site-packages/keras/engine/saving.py:292: UserWarning: No training configuration found in save file: the model was *not* compiled. Compile it manually.\n",
      "  warnings.warn('No training configuration found in save file: '\n"
     ]
    }
   ],
   "source": [
    "model = MMSplice()"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 6,
   "metadata": {
    "scrolled": true
   },
   "outputs": [
    {
     "name": "stderr",
     "output_type": "stream",
     "text": [
      "0it [00:00, ?it/s]/home/muhammedhasan/Projects/MMSplice/old-env/lib/python3.7/site-packages/mmsplice/mmsplice.py:162: UserWarning: None GT donor\n",
      "  warnings.warn(\"None GT donor\", UserWarning)\n",
      "/home/muhammedhasan/Projects/MMSplice/old-env/lib/python3.7/site-packages/mmsplice/mmsplice.py:164: UserWarning: None AG donor\n",
      "  warnings.warn(\"None AG donor\", UserWarning)\n",
      "5it [00:16,  2.95s/it]\n"
     ]
    }
   ],
   "source": [
    "predictions = predict_all_table(model, dl, assembly=True, pathogenicity=True,\n",
    "                                splicing_efficiency=True, split_seq=False)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 7,
   "metadata": {},
   "outputs": [],
   "source": [
    "def exon_annotation_mapping(exon):\n",
    "    loc = exon.split('_')\n",
    "    start = int(loc[1]) - 1\n",
    "    loc[1] = str(start)\n",
    "    return '%s:%s-%s' % tuple(loc)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 8,
   "metadata": {},
   "outputs": [],
   "source": [
    "predictions['exons'] = predictions['exons'].map(exon_annotation_mapping)\n",
    "predictions = predictions.set_index(['ID', 'exons'])"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 9,
   "metadata": {},
   "outputs": [],
   "source": [
    "import pandas as pd\n",
    "# run notebooks example notebook file to obtain this file\n",
    "df = pd.read_csv('../notebooks/pred.csv')\n",
    "df = df.set_index(['ID', 'exons'])"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 10,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style scoped>\n",
       "    .dataframe tbody tr th:only-of-type {\n",
       "        vertical-align: middle;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "\n",
       "    .dataframe thead th {\n",
       "        text-align: right;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "      <th>exon_id</th>\n",
       "      <th>gene_id</th>\n",
       "      <th>gene_name</th>\n",
       "      <th>transcript_id</th>\n",
       "      <th>delta_logit_psi</th>\n",
       "      <th>ref_acceptorIntron</th>\n",
       "      <th>ref_acceptor</th>\n",
       "      <th>ref_exon</th>\n",
       "      <th>ref_donor</th>\n",
       "      <th>ref_donorIntron</th>\n",
       "      <th>alt_acceptorIntron</th>\n",
       "      <th>alt_acceptor</th>\n",
       "      <th>alt_exon</th>\n",
       "      <th>alt_donor</th>\n",
       "      <th>alt_donorIntron</th>\n",
       "      <th>pathogenicity</th>\n",
       "      <th>efficiency</th>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>ID</th>\n",
       "      <th>exons</th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th rowspan=\"5\" valign=\"top\">17:41197805:ACATCTGCC:['A']</th>\n",
       "      <th>17:41196311-41197819:-</th>\n",
       "      <td>ENSE00001814242</td>\n",
       "      <td>ENSG00000012048</td>\n",
       "      <td>BRCA1</td>\n",
       "      <td>ENST00000357654</td>\n",
       "      <td>0.001848</td>\n",
       "      <td>-2.924059</td>\n",
       "      <td>5.068939</td>\n",
       "      <td>-4.191132</td>\n",
       "      <td>-3.197544</td>\n",
       "      <td>0.105083</td>\n",
       "      <td>-2.924059</td>\n",
       "      <td>5.068939</td>\n",
       "      <td>-4.190357</td>\n",
       "      <td>-3.197544</td>\n",
       "      <td>0.105083</td>\n",
       "      <td>0.908687</td>\n",
       "      <td>-0.119514</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>17:41196312-41197819:-</th>\n",
       "      <td>ENSE00001312675</td>\n",
       "      <td>ENSG00000012048</td>\n",
       "      <td>BRCA1</td>\n",
       "      <td>ENST00000354071</td>\n",
       "      <td>0.001851</td>\n",
       "      <td>-2.924059</td>\n",
       "      <td>5.068939</td>\n",
       "      <td>-4.190762</td>\n",
       "      <td>-2.977995</td>\n",
       "      <td>0.105083</td>\n",
       "      <td>-2.924059</td>\n",
       "      <td>5.068939</td>\n",
       "      <td>-4.189985</td>\n",
       "      <td>-2.977995</td>\n",
       "      <td>0.105083</td>\n",
       "      <td>0.898349</td>\n",
       "      <td>-0.119507</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>17:41196821-41197819:-</th>\n",
       "      <td>ENSE00001831829</td>\n",
       "      <td>ENSG00000012048</td>\n",
       "      <td>BRCA1</td>\n",
       "      <td>ENST00000468300</td>\n",
       "      <td>0.006490</td>\n",
       "      <td>-2.924059</td>\n",
       "      <td>5.068939</td>\n",
       "      <td>-3.869307</td>\n",
       "      <td>-2.182720</td>\n",
       "      <td>0.105083</td>\n",
       "      <td>-2.924059</td>\n",
       "      <td>5.068939</td>\n",
       "      <td>-3.865532</td>\n",
       "      <td>-2.182720</td>\n",
       "      <td>0.105083</td>\n",
       "      <td>0.847234</td>\n",
       "      <td>-0.108008</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>17:41197579-41197819:-</th>\n",
       "      <td>ENSE00002914501</td>\n",
       "      <td>ENSG00000012048</td>\n",
       "      <td>BRCA1</td>\n",
       "      <td>ENST00000586385</td>\n",
       "      <td>0.044888</td>\n",
       "      <td>-2.924059</td>\n",
       "      <td>5.068939</td>\n",
       "      <td>-3.507481</td>\n",
       "      <td>-3.032851</td>\n",
       "      <td>0.105083</td>\n",
       "      <td>-2.924059</td>\n",
       "      <td>5.068939</td>\n",
       "      <td>-3.478895</td>\n",
       "      <td>-3.032851</td>\n",
       "      <td>0.105083</td>\n",
       "      <td>0.894611</td>\n",
       "      <td>-0.012830</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>17:41197645-41197819:-</th>\n",
       "      <td>ENSE00001937547</td>\n",
       "      <td>ENSG00000012048</td>\n",
       "      <td>BRCA1</td>\n",
       "      <td>ENST00000493795</td>\n",
       "      <td>0.048545</td>\n",
       "      <td>-2.924059</td>\n",
       "      <td>5.068939</td>\n",
       "      <td>-3.694287</td>\n",
       "      <td>-3.278372</td>\n",
       "      <td>0.105083</td>\n",
       "      <td>-2.924059</td>\n",
       "      <td>5.068939</td>\n",
       "      <td>-3.663338</td>\n",
       "      <td>-3.278372</td>\n",
       "      <td>0.105083</td>\n",
       "      <td>0.908358</td>\n",
       "      <td>-0.003766</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "</div>"
      ],
      "text/plain": [
       "                                                            exon_id  \\\n",
       "ID                          exons                                     \n",
       "17:41197805:ACATCTGCC:['A'] 17:41196311-41197819:-  ENSE00001814242   \n",
       "                            17:41196312-41197819:-  ENSE00001312675   \n",
       "                            17:41196821-41197819:-  ENSE00001831829   \n",
       "                            17:41197579-41197819:-  ENSE00002914501   \n",
       "                            17:41197645-41197819:-  ENSE00001937547   \n",
       "\n",
       "                                                            gene_id gene_name  \\\n",
       "ID                          exons                                               \n",
       "17:41197805:ACATCTGCC:['A'] 17:41196311-41197819:-  ENSG00000012048     BRCA1   \n",
       "                            17:41196312-41197819:-  ENSG00000012048     BRCA1   \n",
       "                            17:41196821-41197819:-  ENSG00000012048     BRCA1   \n",
       "                            17:41197579-41197819:-  ENSG00000012048     BRCA1   \n",
       "                            17:41197645-41197819:-  ENSG00000012048     BRCA1   \n",
       "\n",
       "                                                      transcript_id  \\\n",
       "ID                          exons                                     \n",
       "17:41197805:ACATCTGCC:['A'] 17:41196311-41197819:-  ENST00000357654   \n",
       "                            17:41196312-41197819:-  ENST00000354071   \n",
       "                            17:41196821-41197819:-  ENST00000468300   \n",
       "                            17:41197579-41197819:-  ENST00000586385   \n",
       "                            17:41197645-41197819:-  ENST00000493795   \n",
       "\n",
       "                                                    delta_logit_psi  \\\n",
       "ID                          exons                                     \n",
       "17:41197805:ACATCTGCC:['A'] 17:41196311-41197819:-         0.001848   \n",
       "                            17:41196312-41197819:-         0.001851   \n",
       "                            17:41196821-41197819:-         0.006490   \n",
       "                            17:41197579-41197819:-         0.044888   \n",
       "                            17:41197645-41197819:-         0.048545   \n",
       "\n",
       "                                                    ref_acceptorIntron  \\\n",
       "ID                          exons                                        \n",
       "17:41197805:ACATCTGCC:['A'] 17:41196311-41197819:-           -2.924059   \n",
       "                            17:41196312-41197819:-           -2.924059   \n",
       "                            17:41196821-41197819:-           -2.924059   \n",
       "                            17:41197579-41197819:-           -2.924059   \n",
       "                            17:41197645-41197819:-           -2.924059   \n",
       "\n",
       "                                                    ref_acceptor  ref_exon  \\\n",
       "ID                          exons                                            \n",
       "17:41197805:ACATCTGCC:['A'] 17:41196311-41197819:-      5.068939 -4.191132   \n",
       "                            17:41196312-41197819:-      5.068939 -4.190762   \n",
       "                            17:41196821-41197819:-      5.068939 -3.869307   \n",
       "                            17:41197579-41197819:-      5.068939 -3.507481   \n",
       "                            17:41197645-41197819:-      5.068939 -3.694287   \n",
       "\n",
       "                                                    ref_donor  \\\n",
       "ID                          exons                               \n",
       "17:41197805:ACATCTGCC:['A'] 17:41196311-41197819:-  -3.197544   \n",
       "                            17:41196312-41197819:-  -2.977995   \n",
       "                            17:41196821-41197819:-  -2.182720   \n",
       "                            17:41197579-41197819:-  -3.032851   \n",
       "                            17:41197645-41197819:-  -3.278372   \n",
       "\n",
       "                                                    ref_donorIntron  \\\n",
       "ID                          exons                                     \n",
       "17:41197805:ACATCTGCC:['A'] 17:41196311-41197819:-         0.105083   \n",
       "                            17:41196312-41197819:-         0.105083   \n",
       "                            17:41196821-41197819:-         0.105083   \n",
       "                            17:41197579-41197819:-         0.105083   \n",
       "                            17:41197645-41197819:-         0.105083   \n",
       "\n",
       "                                                    alt_acceptorIntron  \\\n",
       "ID                          exons                                        \n",
       "17:41197805:ACATCTGCC:['A'] 17:41196311-41197819:-           -2.924059   \n",
       "                            17:41196312-41197819:-           -2.924059   \n",
       "                            17:41196821-41197819:-           -2.924059   \n",
       "                            17:41197579-41197819:-           -2.924059   \n",
       "                            17:41197645-41197819:-           -2.924059   \n",
       "\n",
       "                                                    alt_acceptor  alt_exon  \\\n",
       "ID                          exons                                            \n",
       "17:41197805:ACATCTGCC:['A'] 17:41196311-41197819:-      5.068939 -4.190357   \n",
       "                            17:41196312-41197819:-      5.068939 -4.189985   \n",
       "                            17:41196821-41197819:-      5.068939 -3.865532   \n",
       "                            17:41197579-41197819:-      5.068939 -3.478895   \n",
       "                            17:41197645-41197819:-      5.068939 -3.663338   \n",
       "\n",
       "                                                    alt_donor  \\\n",
       "ID                          exons                               \n",
       "17:41197805:ACATCTGCC:['A'] 17:41196311-41197819:-  -3.197544   \n",
       "                            17:41196312-41197819:-  -2.977995   \n",
       "                            17:41196821-41197819:-  -2.182720   \n",
       "                            17:41197579-41197819:-  -3.032851   \n",
       "                            17:41197645-41197819:-  -3.278372   \n",
       "\n",
       "                                                    alt_donorIntron  \\\n",
       "ID                          exons                                     \n",
       "17:41197805:ACATCTGCC:['A'] 17:41196311-41197819:-         0.105083   \n",
       "                            17:41196312-41197819:-         0.105083   \n",
       "                            17:41196821-41197819:-         0.105083   \n",
       "                            17:41197579-41197819:-         0.105083   \n",
       "                            17:41197645-41197819:-         0.105083   \n",
       "\n",
       "                                                    pathogenicity  efficiency  \n",
       "ID                          exons                                              \n",
       "17:41197805:ACATCTGCC:['A'] 17:41196311-41197819:-       0.908687   -0.119514  \n",
       "                            17:41196312-41197819:-       0.898349   -0.119507  \n",
       "                            17:41196821-41197819:-       0.847234   -0.108008  \n",
       "                            17:41197579-41197819:-       0.894611   -0.012830  \n",
       "                            17:41197645-41197819:-       0.908358   -0.003766  "
      ]
     },
     "execution_count": 10,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "df.head()"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 11,
   "metadata": {},
   "outputs": [],
   "source": [
    "df_join = predictions.join(df, how='inner')[['mmsplice_dlogitPsi', 'delta_logit_psi']]"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 12,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style scoped>\n",
       "    .dataframe tbody tr th:only-of-type {\n",
       "        vertical-align: middle;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "\n",
       "    .dataframe thead th {\n",
       "        text-align: right;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "      <th>mmsplice_dlogitPsi</th>\n",
       "      <th>delta_logit_psi</th>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>ID</th>\n",
       "      <th>exons</th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>17:41258504:A:['T']</th>\n",
       "      <th>17:41258472-41258550:-</th>\n",
       "      <td>0.268059</td>\n",
       "      <td>0.268059</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>17:41228637:A:['G']</th>\n",
       "      <th>17:41228504-41228631:-</th>\n",
       "      <td>-0.420457</td>\n",
       "      <td>-0.420457</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>17:41246873:A:['C']</th>\n",
       "      <th>17:41246760-41246877:-</th>\n",
       "      <td>0.085160</td>\n",
       "      <td>0.085160</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>17:41246761:C:['T']</th>\n",
       "      <th>17:41245586-41246877:-</th>\n",
       "      <td>0.031677</td>\n",
       "      <td>0.031677</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>17:41267739:T:['G']</th>\n",
       "      <th>17:41267742-41267796:-</th>\n",
       "      <td>-0.895924</td>\n",
       "      <td>-0.895926</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "</div>"
      ],
      "text/plain": [
       "                                            mmsplice_dlogitPsi  \\\n",
       "ID                  exons                                        \n",
       "17:41258504:A:['T'] 17:41258472-41258550:-            0.268059   \n",
       "17:41228637:A:['G'] 17:41228504-41228631:-           -0.420457   \n",
       "17:41246873:A:['C'] 17:41246760-41246877:-            0.085160   \n",
       "17:41246761:C:['T'] 17:41245586-41246877:-            0.031677   \n",
       "17:41267739:T:['G'] 17:41267742-41267796:-           -0.895924   \n",
       "\n",
       "                                            delta_logit_psi  \n",
       "ID                  exons                                    \n",
       "17:41258504:A:['T'] 17:41258472-41258550:-         0.268059  \n",
       "17:41228637:A:['G'] 17:41228504-41228631:-        -0.420457  \n",
       "17:41246873:A:['C'] 17:41246760-41246877:-         0.085160  \n",
       "17:41246761:C:['T'] 17:41245586-41246877:-         0.031677  \n",
       "17:41267739:T:['G'] 17:41267742-41267796:-        -0.895926  "
      ]
     },
     "execution_count": 12,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "df_join.head()"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 13,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "<matplotlib.collections.PathCollection at 0x7f662c309470>"
      ]
     },
     "execution_count": 13,
     "metadata": {},
     "output_type": "execute_result"
    },
    {
     "data": {
      "image/png": "iVBORw0KGgoAAAANSUhEUgAAAYIAAAD4CAYAAADhNOGaAAAABHNCSVQICAgIfAhkiAAAAAlwSFlzAAALEgAACxIB0t1+/AAAADh0RVh0U29mdHdhcmUAbWF0cGxvdGxpYiB2ZXJzaW9uMy4xLjEsIGh0dHA6Ly9tYXRwbG90bGliLm9yZy8QZhcZAAAbTUlEQVR4nO3df5DcdZ3n8ecrw4gDhw5IQBiIyUE2W7CRRKcAK64FLBBk90zIygILrnvnXfQKqk7Zyl1yUopbUIlmBffOH2xQat1S+bEujKzJEsJGzpMCdOIEkgA5A2QhDQdhJay3jDhJ3vfH9CSdSfdM93R/+/v99vf1qJqa7m9/uufdk0y/+vv5fPrzUURgZmbFNS3tAszMLF0OAjOzgnMQmJkVnIPAzKzgHARmZgV3RNoFTMXxxx8fM2fOTLsMM7Nc2bRp02sRMX388VwGwcyZMxkcHEy7DDOzXJH0T9WOu2vIzKzgHARmZgXnIDAzKzgHgZlZwTkIzMwKLpezhsysPgNDJVav385Le4Y5ubeHZQvnsHh+X9plWcY4CMw61MBQiRX3bmF4ZB8ApT3DrLh3C4DDwA7hriGzDrV6/fYDITBmeGQfq9dvT6kiyyoHgVmHem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PAz9IsZYpyfrfQq7OCCYi6TLgfwLTgbWSNkfEQuBDwJ9LGgH2A5+KiEwO5NR6DhGxTdI9wFPAXuDaiNiXZq11+pKkeYyeyu8EPpluOfWJiL2SrgPWA13AHRGxLeWyGnUicJ8kGP07/15EPJBuSZOTdCdwHnC8pF3A54FVwD2SPsHo8vN/lF6Fk6vxHM7L8t+Cl5gwMyu4ju8aMjOziTkIzMwKzkFgZlZwDgIzs4JzEJiZFZyDwMys4BwEZmYF9/8B2/Z0zwZo9WUAAAAASUVORK5CYII=\n",
      "text/plain": [
       "<Figure size 432x288 with 1 Axes>"
      ]
     },
     "metadata": {
      "needs_background": "light"
     },
     "output_type": "display_data"
    }
   ],
   "source": [
    "import matplotlib.pyplot as plt\n",
    "\n",
    "plt.scatter(df_join['mmsplice_dlogitPsi'], df_join['delta_logit_psi'])"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 14,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "<matplotlib.axes._subplots.AxesSubplot at 0x7f662c2118d0>"
      ]
     },
     "execution_count": 14,
     "metadata": {},
     "output_type": "execute_result"
    },
    {
     "data": {
      "image/png": "iVBORw0KGgoAAAANSUhEUgAAAX4AAAD4CAYAAADrRI2NAAAABHNCSVQICAgIfAhkiAAAAAlwSFlzAAALEgAACxIB0t1+/AAAADh0RVh0U29mdHdhcmUAbWF0cGxvdGxpYiB2ZXJzaW9uMy4xLjEsIGh0dHA6Ly9tYXRwbG90bGliLm9yZy8QZhcZAAAYl0lEQVR4nO3df4zc9X3n8efrTEIQm2JSp1vHds8gOdEZfKV4RLhrEs0eFIwbxaTqcbYQ2CGtQwNS0PlUTNMWFIrkXuNEQmnhNocFXDgWLoTgs80Rh2NFI9UJGDlezI+wBnP1ns8ogdjZYPnOyfv++H7W/Wa9452dWX9nx5/XQxrtdz7fz/f7ec9nZ18z+53vzCgiMDOzfPyzThdgZmbVcvCbmWXGwW9mlhkHv5lZZhz8ZmaZOaPTBUxmzpw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mbNfKzETyj+7TsjPbua1o+emKxuSWcAfwAsPck+RtLPtyQ9TnG4YFrv1M3Or6SvA1smWFXZR3g0MadrgE8Cl0U6aDrBPk75nDbQzDyN9dmf7h/nUNxPKyXpPRSh/1BEfGv8+vIDQURsk/R3kuZEROUfitbE73OmfcTMVcALEXFw/IqpzqsP9ZxoM7AynSVxHsWj5g/KHVIwPAP8YWpaDVT5H8TlwCsRsX+ilZLOlvT+sWWKFy9frLA+xh0L/XSD8WfER3hIWgb8KfCpiHi3QZ9Ozmkz87SZ4n4Ixf3yfzZ6ADtV0msK9wEvR8RXGvT5zbHXHiRdQpFBnXiAaub3uRm4Pp3dcylwKCIOVFxqWcP/8qc8r51+lbpTF4ow2g8cBQ4CT5XWfZHiLIpXgatK7duAD6Xl8ykeEIaB/wacWWHt9wM3jmv7ELCtVNsP02UPxeGMquf3vwBDwG6KP6C54+tM15dTnP2xtxN1phqGKY7l7kqXe8fX2uk5nWiegC9RPFgBvC/dD4fT/fL8DszjxygO7e0uzeVy4Max+ytwc5q/H1K8kP6vO/Q7n/D3Oa5WUXxx1N50X651otZUy9kUQX5Oqa3lefVHNpiZZcaHeszMMuPgNzPLjIPfzCwzDn4zs8w4+M3MMuPgNzPLjIPfzCwz/x9Nt2I7zWnp9QAAAABJRU5ErkJggg==\n",
      "text/plain": [
       "<Figure size 432x288 with 1 Axes>"
      ]
     },
     "metadata": {
      "needs_background": "light"
     },
     "output_type": "display_data"
    }
   ],
   "source": [
    "(df_join['delta_logit_psi'] - df_join['mmsplice_dlogitPsi']).hist(bins=50)"
   ]
  }
 ],
 "metadata": {
  "kernelspec": {
   "display_name": "Python 3",
   "language": "python",
   "name": "python3"
  },
  "language_info": {
   "codemirror_mode": {
    "name": "ipython",
    "version": 3
   },
   "file_extension": ".py",
   "mimetype": "text/x-python",
   "name": "python",
   "nbconvert_exporter": "python",
   "pygments_lexer": "ipython3",
   "version": "3.7.1"
  }
 },
 "nbformat": 4,
 "nbformat_minor": 2
}
